import request from '@/utils/request'

// 封装一个获取验证码的接口
export const getCodeAPI = (data) => {
  return request({
    url: '/au/code',
    method: 'post',
    data
  })
}

// 封装一个登录的接口
export const loginAPI = (data) => {
  return request({
    url: '/au/login',
    method: 'post',
    data
  })
}
// 封装一个获取用户信息的接口
export const reqInfoAPI = (params) => {
  return request({
    url: '/au/info',
    params
  })
}
// 封装一个修改用户信息的接口
export const editInfoAPI = (data) => {
  return request({
    url: '/au/edit',
    method: 'post',
    data
  })
}
// 封装一个用户头像文件上传的接口
export const uploadAPI = (data) => {
  return request({
    url: '/upload',
    method: 'post',
    data
  })
}